/* router V5 基础使用 */

/* 一级路由 */

/* react-router-dom 实现 */
// 样式私有化处理  styled-components+style
import React from "react";
import {NavBarBox, NavBox} from "./NavStyle"
import {HashRouter, NavLink} from "react-router-dom";
import routes from "../../router-v5/routes";
import RouterView from "../../router-v5/index.js"


const Nav = function () {
    return <HashRouter>
        <NavBox>
            <h2 className="title">购物商城</h2>
            <NavBarBox hover={'red'}>
                <NavLink to="/a">首页</NavLink>
                <NavLink to="/b">秒杀</NavLink>
                <NavLink to="/c">我的</NavLink>
            </NavBarBox>
        </NavBox>
        <div>
            111
            <RouterView routes={routes}/>
        </div>
    </HashRouter>
}

export default Nav